package cn.hh.util;

import lombok.Data;

@Data
public class AjaxResule {
    private Boolean success=true;
    /*未报错返回字符串*/
    private String message="操作成功";
    /*报错信息代码填充*/
    private Object resultObj;
    /*报错信息填充方法*/
    public static AjaxResule me(){
        return new AjaxResule();
    }

    /*链式写法*/
    public AjaxResule setSuccess(Boolean success){
        this.success = success;
        return this;
    }
    /*报错信息自动设置字符串填充*/
    public AjaxResule setMessage(String message) {
        this.success = false;
        this.message = message;
        return this;
    }
    /*报错信息代码填充*/
    public AjaxResule setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
}
